#ifndef _MYASSERT_H_
#define _MYASSERT_H_

#include <stdio.h>
#include <assert.h>


#ifdef __cplusplus
extern "C" {
#endif



#if ASSERT  
    #define Assert(condition)    {                              \
        if (!(condition))                                       \
        {                                                       \
            printf("_Assert: %s, %d",__FILE__, __LINE__ );		\
		}														\
		assert(condition); }

    #define AssertV(condition,errNo)    {                                   \
        if (!(condition))                                                   \
        {                                                                   \
            printf( s,kAssertBuffSize -1, "_AssertV: %s, %d (%d)",__FILE__, __LINE__, errNo );    \
        }   }

	#define AssertV2(condition,msg)    {                                   \
		if (!(condition))                                                   \
		{                                                                   \
		printf( s,kAssertBuffSize -1, "_AssertV: %s, %d (%s)",__FILE__, __LINE__, msg );    \
		}																	\
		assert(condition); }

	
    #define Warn(condition) {                                       \
            if (!(condition))                                       \
                printf( "_Warn: %s, %d\n",__FILE__, __LINE__ );     }                                                           
                                         
    #define WarnV(condition,msg)        {                               \
        if (!(condition))                                               \
            printf ("_WarnV: %s, %d (%s)\n",__FILE__, __LINE__, msg );  }                                                   
                                         
    #define WarnVE(condition,msg,err)  {                           		\
        if (!(condition))                                               \
        {   char buffer[kAssertBuffSize];								\
            buffer[kAssertBuffSize -1] = 0;                              \
            printf ("_WarnV: %s, %d (%s, %s [err=%d])\n",__FILE__, __LINE__, msg, qtss_strerror(err,buffer,sizeof(buffer) -1), err );  \
        }	}

#else
            
    #define Assert(condition) ((void) 0)
    #define AssertV(condition,errNo) ((void) 0)
    #define Warn(condition) ((void) 0)
    #define WarnV(condition,msg) ((void) 0)

#endif


#ifdef __cplusplus
}
#endif

#endif //_MY_ASSERT_H_
